#!/usr/bin/python
# coding=utf-8

import plotly
import plotly.plotly
import plotly.graph_objs as abcc
import plotly.plotly

class Piecharts:
    def __init__(self):
        print "欢迎使用饼状图生成类"

    def makePiecharts(self,labels,values,filename):
        trace = abcc.Pie(labels = labels,values= value)
        plotly.offline.plot([trace],filename=filename)

if __name__=="__main__":
    print 123
    labels = ["one","two","three","four","five"]
    value = [2123,3123,4355,11023,5225]
    drive = Piecharts()
    drive.makePiecharts(labels,value,"test.html")

